<template>
  <!-- 顶部通栏 -->
  <AppTopnav></AppTopnav>
  <!-- 头部布局 -->
  <AppHeader></AppHeader>
  <!-- 头部弹性吸顶 -->
  <AppHeaderSticky></AppHeaderSticky>
  <main>
    <router-view></router-view>
  </main>
  <!-- 公共底部 -->
  <AppFooter></AppFooter>
</template>

<script>
import AppTopnav from '@/components/App-topnav.vue'
import AppHeader from '@/components/App-header.vue'
import AppHeaderSticky from '@/components/App-header-sticky.vue'
import AppFooter from '@/components/App-footer.vue'
import { useStore } from 'vuex'

export default {
  name: 'Layout',
  components: {
    AppTopnav,
    AppHeader,
    AppFooter,
    AppHeaderSticky
  },
  setup () {
    const store = useStore()
    store.dispatch('category/getList')
  }
}
</script>

<style lang="less"></style>
